<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>面向对象-enlarge</title>
    <link rel="stylesheet" href="./面向对象-enlarge.css">
</head>

<body>
    <div class="box box1">
        <!-- 盒模型叫img -->
        <div class="img">
            <!-- 里面放遮罩框 -->
            <div class="mask"></div>
        </div>
        <!-- 盒模型enlarge 显示放大镜图片 -->
        <div class="enlarge"></div>
    </div>
    <div class="box box2">
        <!-- 盒模型叫img -->
        <div class="img">
            <!-- 里面放遮罩框 -->
            <div class="mask"></div>
        </div>
        <!-- 盒模型enlarge 显示放大镜图片 -->
        <div class="enlarge"></div>
    </div>
    
</body>

</html>
<!-- <script src="./面向对象-enlarge.js"></script> -->
<script type="module">
    import Enlarge from './面向对象-enlarge.js'
    let enlarge1 = new Enlarge('.box1')
    let enlarge2 = new Enlarge('.box2')
</script>